package com.chencs.app.category.service;

import com.chencs.vo.biz.category.CategoryModel;
import com.chencs.vo.biz.product.KeyModel;
import com.chencs.vo.net.request.CategoryRequest;
import com.chencs.vo.net.request.RequestBase;
import com.chencs.webmvc.rest.RestFullTemplate;
import org.apache.commons.lang3.StringUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.HashMap;
import java.util.List;
import java.util.Map;

/**
 * Created by Administrator on 2017/10/9.
 */
@Service
public class AppCategoryService {


    @Autowired
    RestFullTemplate restTemplate;
    private static final String URLPATH = "service-common/app/category/";
    public String categoryList(CategoryRequest request) throws Exception{
        String ret = restTemplate.postForObject(URLPATH + "categoryList", String.class,request);
        return ret;
    }

    public String getAllCategoryList(CategoryRequest request) throws Exception{
        String ret = restTemplate.postForObject(URLPATH + "getAllCategoryList", String.class,request);
        return ret;
    }


    public String getOtherCategoryList(CategoryRequest request){
        String ret = restTemplate.postForObject(URLPATH + "getOtherCategoryList", String.class,request);
        return ret;
    }

    public  String getKeyList(RequestBase request){
        String ret = restTemplate.postForObject(URLPATH + "keyList", String.class,request);
        return ret;
    }

}
